Add default.execution.threads server config to decouple default query parallelism from max#18622
Open
shauryachats wants to merge 1 commit into
Open
Conversation
… parallelism from max (#TBD) Currently, `max.execution.threads` serves as both the hard cap and the implicit default for per-query execution threads. When operators tune it up, all queries immediately use the higher value. This introduces `pinot.server.query.executor.default.execution.threads` so that operators can set a lower default for normal queries while still allowing selected queries to reach the max via `SET maxExecutionThreads`. Resolution order: 1. Per-query override (SET maxExecutionThreads=N) — capped by max 2. Server default (default.execution.threads) — capped by max 3. Server max (max.execution.threads) — legacy fallback When not configured, behavior is unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18622 +/- ##
============================================
- Coverage 64.45% 64.39% -0.06%
Complexity 1137 1137
============================================
Files 3337 3337
Lines 206067 206081 +14
Branches 32127 32129 +2
============================================
- Hits 132816 132714 -102
- Misses 62599 62727 +128
+ Partials 10652 10640 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR Introduces
pinot.server.query.executor.default.execution.threadswhich sets the default execution threads per query, decoupled frommax.execution.threads. The reason we need this is currentlymax.execution.threadsserves as both the hard cap and implicit default, and if we want to accomodate a new use case where we want to increase themax.execution.threads, we do not want the existing queries (without an explicitSET maxExecutionThreadsto automatically scale up the execution threads) to facilitate incremental safe migration to higher execution threads.When not configured, behavior is completely unchanged (backward compatible).
Resolution order:
SET maxExecutionThreads=N) — capped by maxdefault.execution.threads) — decoupled from max, but still capped by itmax.execution.threads) — legacy fallbackExample
SET maxExecutionThreads=10→ 10 threadsSET maxExecutionThreads=20→ 16 threads (capped)